<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <title>找回密码</title>
    <link rel="stylesheet" href="../../css/reset.css">
    <style>
        body {
            width: 100%;
            height: 6.67rem;
            background-color: #fff;
            -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
            padding-top: 0.5rem;
            font-family: Helvetica;
            color: #333333;
            font-size: 0.28rem;
            -webkit-user-select: none;
            height: auto;
        }

        .head {
            width: 0.44rem;
            height: 0.44rem;
            background-color: #ffffff;
            display: flex;
            display: -webkit-flex;
            justify-content: space-between;
            -webkit-justify-content: space-between;
            align-items: center;
            -webkit-align-items: center;
            box-sizing: border-box;
            font-size: 0.28rem;
            /* border-bottom: 0.01rem solid #e5e5e5; */
        }

        .head img {
            width: 0.21rem;
            height: 0.36rem;
            margin-left: 0.3rem;
        }

        .head_title {
            font-size: 0.36rem;
            color: #333333;
            -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
        }

        .choose-item {
            height: 0.82rem;
            margin-top: 0.58rem;
            padding: 0 0.3rem;
            display: flex;
            justify-content: flex-start;
            -webkit-justify-content: flex-start;
            align-items: center;
            -webkit-align-items: center;
            display: -webkit-flex;
            font-size: 0.4rem;
        }

        .choose-item p:first-of-type {
            font-size: 0.46rem;
            font-weight: 500;
            margin-right: 0.42rem;
        }

        .choose-item p:last-of-type {
            font-weight: 400;
            margin-right: 0.42rem;
            font-size: 0.36rem;
            color: #616161;
        }

        .phone {
            width: 100%;
            background-color: #fff;
            margin-top: 0.27rem;
            padding: 0 0.3rem;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            -webkit-flex-direction: column;
            align-items: flex-start;
            -webkit-align-items: flex-start;
            box-sizing: border-box;
        }

        .phone p {
            font-size: 0.3rem;
            color: #d9d9d9;
        }

        .choseDateArea {
            padding-right: 0.1rem;
            width: 100%;
            height: 0.7rem;
            display: flex;
            display: -webkit-flex;
            justify-content: space-between;
            -webkit-justify-content: space-between;
            align-items: center;
            -webkit-align-items: center;
            box-sizing: border-box;
            font-size: 0.28rem;
            border-bottom: 1px solid #f5f5f5;
        }

        .choseDateArea img {
            width: 0.16rem;
            height: 0.36rem;
            margin-left: 0.34rem;
        }

        .user-about {
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            -webkit-flex-direction: column;
            padding: 0 0.3rem;
        }

        .user-about input {
            outline: none;
            display: inline-block;

            color: #333333;
            flex: 1;
            height: 0.83rem;
            font-size: 0.28rem;
            box-sizing: border-box;
            border: none;
            width: 100%;
            /*border-bottom: 0.01rem solid #e5e5e5;*/
        }

        .user-about input::-webkit-input-placeholder {
            font-size: 0.28rem;
            color: #cccccc;
        }

        .next {
            margin: auto;
            margin-top: 0.8rem;
            width: 6.9rem;
            height: 0.88rem;
            color: #181818;
            line-height: 0.88rem;
            font-size: 0.34rem;
            background-size: cover;
            background-color: #e1e1e1;
            text-align: center;
            border-radius: 0.1rem;
        }

        .forget {
            text-align: center;
            font-size: 0.28rem;
            color: #ffd203;
            margin-top: 0.5rem;
        }

        .choose-areabox {
            width: 100%;
            height: 100%;
            display: flex;
            display: -webkit-flex;
            justify-content: center;
            -webkit-justify-content: center;
            position: absolute;
            top: 0;
            left: 0;
            background: rgba(255, 255, 255, 0.9);
            display: none;
        }

        .login {
            display: block;
        }

        /* 注册 */
        .regphone {
            width: 100%;
            /* border-bottom: 0.01rem solid safte0e0e0; */
            /* border-top: 0.01rem solid #e0e0e0; */
            background-color: #fff;
            margin-top: 0.27rem;
            padding: 0 0.3rem;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            -webkit-flex-direction: column;
            align-items: flex-start;
            -webkit-align-items: flex-start;
            box-sizing: border-box;
        }

        .regphone p {
            font-size: 0.3rem;
            color: #d9d9d9;
        }

        .regchoseDateArea {
            padding-right: 0.1rem;
            width: 100%;
            height: 0.7rem;
            display: flex;
            display: -webkit-flex;
            justify-content: space-between;
            -webkit-justify-content: space-between;
            align-items: center;
            -webkit-align-items: center;
            box-sizing: border-box;
            font-size: 0.28rem;
            border-bottom: 0.01rem solid #e5e5e5;
        }

        .regchoseDateArea img {
            width: 0.16rem;
            height: 0.36rem;
            margin-left: 0.34rem;
        }

        .reg-about {
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            -webkit-flex-direction: column;
            padding: 0 0.3rem;
        }

        .reg-about input {
            outline: none;
            display: inline-block;
            /*margin-top: 0.54rem;*/
            width: 100%;
            color: #181818;
            flex: 1;
            height: 0.83rem;
            font-size: 0.28rem;
            box-sizing: border-box;
            border: none;
            /*border-bottom: 0.01rem solid #e5e5e5;*/
        }

        .reg-about input::-webkit-input-placeholder {
            font-size: 0.28rem;
            color: #cccccc;
        }

        .saftcode {
            height: 1.28rem;
            padding-top: 0.1rem;
            display: flex;
            display: -webkit-flex;
            justify-content: space-between;
            -webkit-justify-content: space-between;
            align-items: flex-end;
            -webkit-align-items: flex-end;
            border-bottom: 1px solid #e5e5e5;
            padding-right: 0.1rem;
        }

        .saftcode input {
            /* outline: 1px solid red; */
            flex: 1;
            width: 45% !important;
            height: 0.88rem;
        }

        .condition {
            display: inline-block;
            height: 0.76rem;
            /*width: 2022rem;*/
            padding: 0 0.5rem;
            text-align: center;
            font-size: 0.26rem;
            line-height: 0.76rem;
            background-color: #e1e1e1;
            margin-bottom: 0.1rem;
            border-radius: 0.1rem;
            color: #181818;
            border: none;
        }

        .regnext {
            margin: auto;
            margin-top: 0.8rem;
            width: 6.9rem;
            height: 0.88rem;
            color: #181818;
            line-height: 0.88rem;
            font-size: 0.32rem;
            background-size: cover;
            background-color: #e1e1e1;
            text-align: center;
            border-radius: 0.1rem;
        }

        .forget {
            text-align: center;
            font-size: 0.28rem;
            color: #ffd203;
            margin-top: 0.5rem;
        }

        .choose-areabox {
            width: 100%;
            height: 68.5%;
            display: flex;
            display: -webkit-flex;
            justify-content: center;
            -webkit-justify-content: center;
            position: fixed;
            top: 31.5%;
            left: 0;
            background: rgba(255, 255, 255, 0.95);
            display: none;
            overflow: scroll;
        }

        .choose-area {
            width: 100%;
            height: 100%;
            padding: 0 0.3rem;
            box-sizing: border-box;
            overflow: scroll;
        }

        .choose-area li {
            display: inline-block;
            text-align: center;
            width: 100%;
            height: 0.88rem;
            line-height: 0.88rem;
            border-bottom: 0.01rem solid #e5e5e5;
        }

        .aui-checkbox {
            width: 0.44rem;
            height: 0.44rem;
            background-color: #ffffff;
            border: solid 1px #dddddd;
            -webkit-border-radius: 0.4rem;
            border-radius: 0.4rem;
            margin: 0;
            padding: 0;
            position: relative;
            display: inline-block;
            vertical-align: top;
            cursor: default;
            -webkit-appearance: none;
            -webkit-transition: background-color ease 0.1s;
            transition: background-color ease 0.1s;
        }

        .aui-checkbox {
            border-radius: 0.1rem;
        }

        .aui-checkbox:checked,
        .aui-checkbox.aui-checked {
            background-color: #ffd203;
            border: solid 1px #ffd203;
            text-align: center;
            background-clip: padding-box;
        }

        .aui-checkbox:checked:before,
        .aui-checkbox.aui-checked:before,
        .aui-checkbox:checked:after,
        .aui-checkbox.aui-checked:after {
            content: "";
            width: 0.2rem;
            height: 0.1rem;
            position: absolute;
            top: 80%;
            left: 85%;
            margin-left: -0.25rem;
            margin-top: -0.25rem;
            background: transparent;
            border: 1px solid #ffffff;
            border-top: none;
            border-right: none;
            z-index: 2;
            -webkit-border-radius: 0;
            border-radius: 0;
            -webkit-transform: rotate(-45deg);
            transform: rotate(-45deg);
        }

        .placeholder,
        .placeholder3 {
            font-size: 0.28rem;
            color: #ccc;
            margin: 0;
            overflow: hidden;
            margin-top: 0.85rem;
            padding-bottom: 0.4rem;
        }

        .hoderHeight {
            text-align: left;
        }

        .animateBox {
            border-bottom: 1px solid#f5f5f5;
            height: 1.5rem;
            overflow: hidden;
        }

        .user-about>.inputNostyle,
        .reg-about>#regphoneNumber {
            height: 0;
            border: 0;
            margin: 0;
            opacity: 0;
        }

        .reduce {
            -webkit-animation: showProgress 0.4s 0.4s ease both;
            animation: showProgress 0.4s 0.4s ease both;
            -moz-animation: showProgress 0.4s 0.4s ease both;
            -o-animation: showProgress 0.4s 0.4s ease both;
        }

        .add {
            -webkit-animation: hideProgress 0.4s 0.4s ease both;
            animation: hideProgress 0.4s 0.4s ease both;
            -moz-animation: hideProgress 0.4s 0.4s ease both;
            -o-animation: hideProgress 0.4s 0.4s ease both;
        }

        @keyframes showProgress {
            0% {
                margin-top: 0.85rem;
                padding-bottom: 0.4rem;
            }

            100% {
                margin-top: 0.35rem;
                padding-bottom: 0;
            }
        }

        @-webkit-keyframes showProgress {
            0% {
                margin-top: 0.85rem;
                padding-bottom: 0.4rem;
            }

            100% {
                margin-top: 0.35rem;
                padding-bottom: 0;
            }
        }

        @keyframes hideProgress {
            0% {
                margin-top: 0.35rem;
            }

            100% {
                margin-top: 0.85rem;
            }
        }

        @-webkit-keyframes hideProgress {
            0% {
                margin-top: 0.35rem;
            }

            100% {
                margin-top: 0.85rem;
            }
        }


        .showInput {
            -webkit-animation: animateshow 0.4s 0.4s ease both;
            animation: animateshow 0.4s 0.4s ease both;
            -moz-animation: animateshow 0.4s 0.4s ease both;
            -o-animation: animateshow 0.4s 0.4s ease both;
        }

        .hideInput {
            -webkit-animation: animatehide 0.4s 0.4s ease both;
            animation: animatehide 0.4s 0.4s ease both;
            -moz-animation: animatehide 0.4s 0.4s ease both;
            -o-animation: animatehide 0.4s 0.4s ease both;
        }

        @keyframes animateshow {
            0% {
                height: 0;
                border: 0;
                overflow: hidden;
                opacity: 0;
            }

            100% {
                opacity: 1;
                outline: none;
                display: inline-block;
                color: #333333;
                flex: 1;
                height: 0.83rem;
                font-size: 0.28rem;
                box-sizing: border-box;
                border: none;
            }
        }

        @-webkit-keyframes animateshow {
            0% {
                height: 0;
                border: 0;
                overflow: hidden;
                opacity: 0;
            }

            100% {
                opacity: 1;
                outline: none;
                display: inline-block;
                color: #333333;
                flex: 1;
                height: 0.83rem;
                font-size: 0.28rem;
                box-sizing: border-box;
                border: none;
            }
        }

        @keyframes animatehide {
            0% {
                opacity: 1;
                outline: none;
                display: inline-block;
                color: #333333;
                flex: 1;
                height: 0.83rem;
                font-size: 0.28rem;
                box-sizing: border-box;
                border: none;
            }

            100% {
                height: 0;
                border: 0;
                overflow: hidden;
                opacity: 0;
            }
        }

        @-webkit-keyframes animatehide {
            0% {
                opacity: 1;
                outline: none;
                display: inline-block;
                color: #333333;
                flex: 1;
                height: 0.83rem;
                font-size: 0.28rem;
                box-sizing: border-box;
                border: none;
            }

            100% {
                height: 0;
                border: 0;
                overflow: hidden;
                opacity: 0;
            }
        }

        .checkbox {
            width: 0.44rem;
            height: 0.44rem;
            border: 1px solid gray;
            border-radius: 0.44rem;
            position: relative;
        }

        .checkbox .circle {
            width: 0.2rem;
            height: 0.2rem;
            background: url("../../image/checknew.png") no-repeat center;
            position: relative;
            left: -0.06rem;
            top: -0.56rem;
            display: none;
            margin: 0.03rem;
        }

        .checked .circle {
            display: block;
        }

        body {
            width: 100%;
            background-color: #fff;
            -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
            font-family: Helvetica;
            color: #333333;
            font-size: 0.28rem;
        }

        .testFix {
            width: 100%;
            /*height: 1.32rem;*/
            position: fixed;
            top: 0;
            left: 0;
        }

        .head {
            width: 100%;
            height: 44px;
            background-color: #ffffff;
            display: flex;
            display: -webkit-flex;
            justify-content: space-between;
            -webkit-justify-content: space-between;
            align-items: center;
            -webkit-align-items: center;
            box-sizing: border-box;
            border-bottom: 1px solid #e2e2e2;
            padding: 0 0.26rem;
        }

        .head img {
            width: 0.21rem;
            height: 0.36rem;
            margin-left: 0;
        }

        .head_title {
            font-size: 0.35rem;
            color: #333333;
            -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
        }

        .mes {
            height: 0.7rem;
            line-height: 0.7rem;
            padding-left: 0.26rem;
            color: #656565;
            font-size: 0.24rem;
        }

        .phone {
            width: 100%;
            border-bottom: 0.01rem solid #e0e0e0;
            border-top: 0.01rem solid #e0e0e0;
        }

        .reset input {
            outline: none;
            display: inline-block;
            margin-top: 0.44rem;
            color: #333333;
            flex: 1;
            height: 0.83rem;
            font-size: 0.28rem;
            box-sizing: border-box;
            border: none;
            border-bottom: 0.01rem solid #e5e5e5;
        }

        .reg-about input::-webkit-input-placeholder {
            font-size: 0.28rem;
            color: #cccccc;
        }

        .saftcode {
            display: flex;
            display: -webkit-flex;
            justify-content: space-between;
            -webkit-justify-content: space-between;
            align-items: center;
            -webkit-align-items: center;
            border-bottom: 0.01rem solid #e5e5e5;
            padding-right: 0.1rem;
        }

        .saftcode input {
            border: none;
            flex: 1;
        }

        .saftcode span {
            display: inline-block;
            height: 0.76rem;
            width: 2.02rem;
            text-align: center;
            line-height: 0.76rem;
            margin-top: 0.54rem;
            background-color: #e1e1e1;
            margin-bottom: 0.1rem;
        }

        .mess {
            margin-top: 0.3rem;
            font-size: 0.24rem;
            color: #656565;
            padding-left: 0.26rem;
        }

        .reset {
            padding: 0 0.24rem;
            margin-top: 0.2rem;

            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            -webkit-flex-direction: column;
            background-color: white;
            border-bottom: 0rem solid #e5e5e5;
        }

        .reset input {
            border: none;
            height: 0.88rem;
            line-height: 0.88rem;
            font-size: 0.28rem;
            outline: none;
            border-bottom: 0.01rem solid #e5e5e5;
            color: #333333;
            padding-left: 0.25rem;
            padding-right: 0.25rem;
        }

        .reset input::-webkit-input-placeholder {
            font-size: 0.24rem;
            color: #cccccc;
        }

        #regsaft {
            border: none;
        }

        .phone {
            width: 100%;
            background-color: #fff;
            margin-top: 0.27rem;
            padding: 0 0.3rem;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            -webkit-flex-direction: column;
            align-items: flex-start;
            -webkit-align-items: flex-start;
            box-sizing: border-box;
        }

        .phone p {
            font-size: 0.3rem;
            color: #d9d9d9;
        }

        .choseDateArea {
            padding-right: 0.1rem;
            width: 100%;
            height: 0.7rem;
            display: flex;
            display: -webkit-flex;
            justify-content: space-between;
            -webkit-justify-content: space-between;
            align-items: center;
            -webkit-align-items: center;
            box-sizing: border-box;
            font-size: 0.28rem;
            border-bottom: 0.01rem solid #e5e5e5;
        }

        .choseDateArea img {
            width: 0.16rem;
            height: 0.36rem;
            margin-left: 0.34rem;
        }

        .next {
            margin: 0 auto;
            margin-top: 0.8rem;
            width: 6.9rem;
            height: 0.88rem;
            line-height: 0.88rem;
            color: #ffffff;
            font-size: 0.26rem;
            background-color: #e1e1e1;
            text-align: center;
            background-size: cover;
        }

        .allowget,
        .allowSubmit {
            background: #FFD203 !important;
            color: #fff !important;
        }

        .phone {
            width: 100%;
            background-color: #fff;
            margin-top: 0.27rem;
            padding: 0 0.3rem;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            align-items: flex-start;
            -webkit-align-items: flex-start;
            box-sizing: border-box;
            border-top: 0;
            padding-right: 0;
        }

        .phone p {
            font-size: 0.3rem;
            color: #d9d9d9;
        }

        .choseDateArea {
            padding-right: 0.1rem;
            width: 100%;
            height: 0.7rem;
            display: flex;
            display: -webkit-flex;
            justify-content: space-between;
            -webkit-justify-content: space-between;
            align-items: center;
            -webkit-align-items: center;
            box-sizing: border-box;
            font-size: 0.28rem;
        }

        .choseDateArea img {
            width: 0.16rem;
            height: 0.36rem;
            margin-left: 0.34rem;
        }
    </style>
</head>

<body style="padding:0">
    <div class="testFix">
        <div class="head" style="position: relative">
            <span id="goback"
                style="    position: absolute;z-index: 1;left: 0;padding: 0 0.24rem; padding-right: 0.5rem;top: 0;height: 100%; box-sizing: border-box;line-height: 47px;">
                <img src="../../image/left_jiantouax.png" alt="" style="width: 10px;height: auto" />
            </span>
            <span class="head_title" style="display: block;width: 100%;text-align: center">
                忘记密码
            </span>
            <span style="display: inline-block;width: 0.21rem;height: 0.36rem;">
            </span>
        </div>
    </div>
    <div class="reset" style="margin-top: 1.5rem;">
        <div class="phone" id="choseCountry">
            <p>
                国籍
            </p>
            <div class="choseDateArea" style="border-bottom: 0;">
                <span class="loginarea-name">
                    中国大陆
                </span>
                <span>+
                    <span class="loginarea-number">
                        0086
                    </span>
                    <img src="../../image/arrow.png">
                </span>
            </div>
        </div>
        <input type="tel" id="forgetPhone" placeholder="请输入手机号码" maxlength="13">
        <span class="saftcode">
            <input id="regsaft" type="text" oninput="this.value=this.value.replace(/\D/g, '')" maxlength="6"
                placeholder="短信验证码" style="margin-top: 0.3rem;">
            <button disabled="true" class="condition" style="outline: none;border:none;">获取验证码</button>
        </span>
        <input type="password" name="" id="newpass" placeholder="请输入新密码">
        <input type="password" name="" id="passagin" placeholder="再次输入密码">
    </div>
    <div style="width:100%;height:auto;text-align: center;">
        <button disabled="true" class="next" id="submit" style="outline: none;border:none;">确定</button>
    </div>
    <div class="choose-areabox" data-flag="true" style="z-index: 3;bottom: -200%;">
        <ul class="choose-area">

        </ul>
    </div>
    <div class="cover"
        style="position: fixed;z-index: 2;width: 100%;height:100%;left: 0;top:0;background: rgba(0,0,0,0.5);display: none;">
    </div>
    <script src="../../script/autosize.js"></script>
    <script src="../../script/jquery_three_two_one.js"></script>
    <script src="../../script/fastclick.js"></script>
    <script src="../../script/app.js"></script>
    <script src="../../script/dotmin.js"></script>
    <script type="text/html" id="codeTpl">
        {{~it:value:index}}
        <li data-area={{=value.area_code}} data-name={{=value.name_cn}} data-id="{{=value.id}}">
            <span>
              {{=value.area_code}}
            </span>
            <span>
              <span>
                {{=value.name_cn}}
              </span>
            </span>
          </li>
        {{~}}
    </script>
    <script>
        apiready = function () {
            var app = new APP();
            if (app.ST == "ios") {
                $("input").click(function () {
                    $(this)
                        .focus()
                        .select(); //保险起见，还是加上这句。
                });
            }
            var getCnySms, isCnyCaptcha = 0;
            var phoneNumber = api.pageParam.phoneNumber;
            var idTimes = 0;//倒计时ID
            if (phoneNumber && phoneNumber.length >= 6) {
                $("#forgetPhone").val(phoneNumber);
                $(".condition").addClass("allowget").attr("disabled", false);
            }
            var area_code = api.pageParam.area_code;
            var areaName = api.pageParam.areaName;
            if (!area_code) {
                area_code = "0086";
            } else {
                $(".loginarea-number").text(area_code);
            }
            if (!areaName) {
                areaName = "中国大陆";
            } else {
                $(".loginarea-name").text(areaName);
            }
            var areaindex = [];
            function getAreaCode() {
                app.getAreaCode(function (ret, err) {
                    if (ret.code == 200) {
                        var temp = doT.template($("#codeTpl").text());
                        $(".choose-area").html(temp(ret.data.country));
                    }
                });
            }
            getAreaCode()
            $(".choseDateArea, .regchoseDateArea").on("click", function () {
                $(".cover").fadeIn(80, function () {
                    $(".choose-areabox").animate({
                        bottom: "0"
                    }, 100);
                });
                $(".choose-areabox").css({
                    display: "block"
                });
                $(".choose-areabox").attr("data-flag", "false");
                $(".choose-area li").on("click", function () {
                    $(".choose-areabox").animate({
                        "margin-bottom": "-200%"
                    },
                        100,
                        function () {
                            $(".cover").fadeOut(50);
                        }
                    );
                    area_code = $(this).attr("data-area");
                    areaName = $(this).attr("data-name");
                    $(".choose-areabox").css({
                        display: "none"
                    });
                    $(".choose-areabox").attr("data-flag", "true");
                    $(".area-name").text(areaName);
                    $(".area-number").text(area_code);
                    $(".loginarea-name").text(areaName);
                    $(".loginarea-number").text(area_code);
                });
            });
            $("#verification")
                .val("")
                .keyup(function () {
                    if ($(this).val()) {
                        $(".next")
                            .removeClass("inputNull")
                            .addClass("inputNotNull");
                    } else {
                        $(".next")
                            .addClass("inputNull")
                            .removeClass("inputNotNull");
                    }
                });
            var phoneNum = "";
            $("#forgetPhone").on("keyup", function () {
                phoneNum = String($(this).val()).replace(/ /g, "");
                var leng = phoneNum.length;
                var inputVal = "";
                if (leng > 3 && leng <= 7) {
                    var ph1 = phoneNum.slice(0, 3);
                    var ph2 = phoneNum.slice(3);
                    inputVal = ph1 + " " + ph2;
                }
                if (leng > 7) {
                    var ph1 = phoneNum.slice(0, 3);
                    var ph2 = phoneNum.slice(3, 7);
                    var ph3 = phoneNum.slice(7);
                    inputVal = ph1 + " " + ph2 + " " + ph3;
                }
                if (leng <= 3) {
                    inputVal = phoneNum;
                }
                $(this).val(inputVal);
                if (leng >= 6) {
                    $(".condition").addClass("allowget").attr("disabled", false);
                    window.clearInterval(idTimes);
                } else {
                    $(".condition").removeClass("allowget").attr("disabled", true);
                }
            })
            $("#forgetPhone").on("blur", function () {
                if (!$(this).val()) {
                    app.toast("手机号码不能为空");
                    return
                }
                if ($(this).val().length < 6) {
                    app.toast("请输入正确的手机号码");
                    return
                }
            })
            $("#regsaft").on("blur", function () {
                if (!$(this).val()) {
                    app.toast("验证码不能为空");
                    return
                }
                if ($(this).val().length < 6) {
                    app.toast("请输入正确的验证码");
                    return

                }
            });
            $("#newpass").on("blur", function () {
                if (!$(this).val()) {
                    app.toast("密码不能为空");
                    return
                }
                if ($(this).val().length < 6) {
                    app.toast("密码最低长度为6位");
                    return
                }
            });
            $("#passagin").on("blur", function () {
                if (!$(this).val()) {
                    app.toast("密码不能为空");
                    return
                }
                if ($(this).val().length < 6) {
                    app.toast("密码最低为6位");
                    return
                }
                if ($(this).val() !== $("#newpass").val()) {
                    app.toast("两次输入密码不一致");
                }
            });
            $(".reset input").on("input porpertychange", function () {
                if ($("#forgetPhone").val() && $("#regsaft").val() && $("#newpass").val() && $("#passagin").val()) {
                    $("#submit")
                        .addClass("allowSubmit").attr("disabled", false)
                } else {
                    $("#submit")
                        .removeClass("allowSubmit").attr("disabled", true);
                }
            })
            $("#submit").on("click", function () {
                var windwoYZM = $("#regsaft").val();
                var phoneNumber = $("#forgetPhone").val().replace(/ /g, "");
                var newpass = $("#newpass")
                    .val()
                    .trim();
                var passagin = $("#passagin")
                    .val()
                    .trim();
                if (!windwoYZM) {
                    app.toast("验证码不能为空");
                    return
                }
                if (windwoYZM.length != 6) {
                    app.toast("验证码错误");
                    return
                }
                if (phoneNumber.length < 6 || phoneNumber == "") {
                    app.toast("手机号不正确");
                    return
                }
                if (!newpass || !passagin) {
                    app.toast("密码不能为空");
                    return
                }
                if (newpass.length < 6 || passagin.length < 6) {
                    app.toast("请至少设置6位密码");
                    return
                }
                if (newpass !== passagin) {
                    app.toast("输入密码不一致");
                    return
                }
                app.ajaxPro({
                    url: "site/reset-password",
                    values: {
                        phone: phoneNumber,
                        password: newpass,
                        smscode: windwoYZM,
                        area_code: area_code
                    },
                    openFlower: true
                }, function (ret) {
                    if (ret.code == 200) {
                        app.toast("重置密码成功！");
                        app.closeW("forget");
                        setTimeout(function () {
                            app.goLogin(); // 跳转到登录页面
                        }, 2000);
                    } else {
                        app.toast(ret.message);
                    }
                });
            })
            function getSafetCode() {
                var phoneNum = $("#forgetPhone").val().replace(/ /g, "");
                app.getSmsNologin({
                    mobile: phoneNum,
                    area_code: area_code,
                    blackBox: isCnyCaptcha == 1 ? _fmOpt.getinfo() : "",
                    yzm_token: getCnySms,
                    type: "forgetPwd"
                }, function (ret) {
                    if (ret.code == 200) {
                        canInterval = true;
                        app.countDown(60, function (value) {
                            idTimes = value.id;
                            if (value.time != 0) {
                                $(".condition").text("已发送" + value.time + "s");
                            } else {
                                $(".condition").text("重新获取").attr("disabled", false).addClass("allowget");
                            }
                        });
                    } else {
                        app.toast(ret.message);
                        $(".condition").text("重新获取").attr("disabled", false).addClass("allowget");
                    }
                })
            }

            //CNY 同盾插件初始化
            _fmOpt = {
                display: 'bind', //popup方式渲染验证码
                container: '.condition', //验证码button渲染的目标DOM，自动展现方式下必需，详情见后文
                area: '', //对于custom模式，弹出窗口的加载容器，详情见后文
                partner: "renrenkj",
                appName: "renrenkj_h5",
                width: "",
                height: "",
                fmb: true,
                initialTime: new Date().getTime(),
                token: "renrenkj" + "-" + new Date().getTime() + "-" + Math.random().toString(16).substr(2),
                env: 1,
                getinfo: function () {
                    return "e3Y6ICIyLjUuMCIsIG9zOiAid2ViIiwgczogMTk5LCBlOiAianMgbm90IGRvd25sb2FkIn0=";
                }
            };
            var fm = document.createElement('script');
            fm.type = 'text/javascript';
            fm.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'static.tongdun.net/captcha/main/tdc.js?ver=1.0&t=' + (new Date().getTime() / 600000).toFixed(0);
            var s = document.getElementsByTagName('script')[0];
            s.parentNode.insertBefore(fm, s);
            _fmOpt.beforeValidate = function () {
                $(".condition").removeClass("allowget").attr("disabled", true);
                app.checkIsMechine("sms", function (ret, err) {
                    if (ret.code == 200) {
                        isCnyCaptcha = ret.data;
                        if (isCnyCaptcha == 1) {
                            _fmOpt.onSuccess = function (validateToken) {
                                if (validateToken) {
                                    getCnySms = validateToken;
                                    getSafetCode();
                                } else {
                                    _fmOpt.reset();
                                }
                            };
                            return true;
                        } else {
                            getSafetCode();
                            return false
                        }
                    }
                })
                return true
            }
            _fmOpt.onClose = function (params) {
                $(".condition").text("获取验证码").attr("disabled", false);
            }
            $("#goback").on("click", function () {
                app.closeW();
            });
        };
    </script>
</body>

</html>